home *** CD-ROM | disk | FTP | other *** search
- /*
- File: StdTypIO.h
-
- Contains: functions for read/writing standard typed values from/to storage units
-
- Owned by: Tantek Çelik
-
- Copyright: © 1994 - 1996 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <2> 5/24/96 jpa 1.1MRD: pragma internal
-
- */
-
- #ifndef _STDTYPIO_
- #define _STDTYPIO_
-
-
- #ifndef _ODTYPES_
- #include <ODTypes.h>
- #endif
-
- //==============================================================================
- // Classes used by this interface
- //==============================================================================
-
- #ifdef __cplusplus
- class ODStorageUnit;
- class ODTypeList;
- #else
- #ifndef SOM_ODStorageUnit_h
- #include <StorageU.h>
- #endif
- #endif
-
- //==============================================================================
- // Function prototypes
- //==============================================================================
-
- #ifdef _OD_IMPL_SHARE_UTILS_
- #pragma import on
- #elif defined(PRAGMA_INTERNAL_SUPPORTED)
- #pragma internal on
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- ODBoolean ODGetBooleanProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val);
- void ODSetBooleanProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODBoolean value);
-
- ODUShort ODGetUShortProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val);
- void ODSetUShortProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODUShort value);
-
- ODSShort ODGetSShortProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val);
- void ODSetSShortProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODSShort value);
-
- ODULong ODGetULongProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val);
- void ODSetULongProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODULong value);
-
- ODSLong ODGetSLongProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val);
- void ODSetSLongProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODSLong value);
-
- ODISOStr ODGetISOStrProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODISOStr value, ODULong* size);
- void ODSetISOStrProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODISOStr value);
-
- void ODGetTypeListProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODTypeList* typeList);
- void ODSetTypeListProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODTypeList* typeList);
-
- // ODGetITextProp works as follows: the value returned is that of the
- // name param passed in if name is not null. If name is null, a structure of
- // the necessary size is allocated.
-
- ODIText* ODGetITextProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODIText* name);
- void ODSetITextProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODIText* name);
-
- ODTime ODGetTime_TProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val);
- void ODSetTime_TProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODTime value);
-
- ODPoint* ODGetPointProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODPoint* value);
- void ODSetPointProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODPoint* value);
-
- ODRect* ODGetRectProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODRect* value);
- void ODSetRectProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODRect* value);
-
- ODID ODGetStrongSURefProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val);
- void ODSetStrongSURefProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODID id);
-
- ODID ODGetWeakSURefProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val);
- void ODSetWeakSURefProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODID id);
-
- ODPolygon* ODGetPolygonProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODPolygon* value);
- void ODSetPolygonProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- const ODPolygon* value);
-
- ODMatrix* ODGetMatrixProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODMatrix* value);
- void ODSetMatrixProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop, ODValueType val,
- ODMatrix* value);
-
- //--------------------------------------------------------------------
- // Icon Family I/O
- //--------------------------------------------------------------------
-
- // Note: ODIconFamily is a platform specific type, so these two functions
- // will have platform specific implementations. -TÇ
-
- enum { // For use with iconMask parameter:
- kAllIconsMask = 0xFFFFFFFF, // All icons usable on this platform
- kBWIconsMask = 0x0421 // 1 bit deep, 16,32,64 pixels wide
- };
-
- /* Expected values for the ODValueType begin with "OpenDoc:Type:IconFamily:"
- followed by the name of a platform. These are defined in StdTypes.idl as
- kODIconFamilyMac, kODIconFamilyWin, kODIconFamilyOS2, kODIconFamilyAIX, etc.
- If you only specify kODIconFamily, the current platform's type will be used.
- */
-
- ODIconFamily ODGetIconFamilyProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop,
- ODValueType val, ODULong iconMask);
- void ODSetIconFamilyProp(Environment* ev,
- ODStorageUnit* su, ODPropertyName prop,
- ODValueType val, ODIconFamily iconFamily,
- ODBoolean deleteOtherPlatformIcons);
-
- #ifdef __cplusplus
- } /* extern "C" */
- #endif
-
- #ifdef _OD_IMPL_SHARE_UTILS_
- #pragma import off
- #elif defined(PRAGMA_INTERNAL_SUPPORTED)
- #pragma internal reset
- #endif
-
- #endif // _STDTYPIO_
-